package model.produkt;

import model.ProduktReceta;

import javax.xml.bind.annotation.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Author: Kostika Gorica
 * User:   kosta
 * Date:   3/10/13
 * Time:   9:46 PM
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
@XmlRootElement(name = "produkt")
public class Produkt {
    private int id;
    @XmlElement(nillable = true)
    private String kodi;
    @XmlElement(nillable = true)
    private String emri;
    @XmlElement(nillable = true)
    private String pershkrimi;
    private double cmimiShumice;
    private double cmimiPakice;
    private int igatshem;
    private double prodhimPerDoze;
    private String njesia;
    private int status;
    private int kategoriaID;
    @XmlAnyElement(lax = true)
    @XmlElementRef(type = ProduktKosto.class)
    @XmlElementWrapper
    private List<ProduktKosto> kostoList;
    @XmlAnyElement(lax = true)
    @XmlElementRef(type = ProduktReceta.class)
    @XmlElementWrapper
    private List<ProduktReceta> recetaList;

    public Produkt(){
        this(0,"","","",0.0,0.0,0,0.0,"",0,0);
    }

    public Produkt(int id, String kodi, String emri, String pershkrimi, double cmimiShumice, double cmimiPakice, int igatshem, double prodhimPerDoze, String njesia, int status, int kategoriaID) {
        this.id = id;
        this.kodi = kodi;
        this.emri = emri;
        this.pershkrimi = pershkrimi;
        this.cmimiShumice = cmimiShumice;
        this.cmimiPakice = cmimiPakice;
        this.igatshem = igatshem;
        this.prodhimPerDoze = prodhimPerDoze;
        this.njesia = njesia;
        this.status = status;
        this.kategoriaID = kategoriaID;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getKodi() {
        return kodi;
    }

    public void setKodi(String kodi) {
        this.kodi = kodi;
    }

    public String getEmri() {
        return emri;
    }

    public void setEmri(String emri) {
        this.emri = emri;
    }

    public String getPershkrimi() {
        return pershkrimi;
    }

    public void setPershkrimi(String pershkrimi) {
        this.pershkrimi = pershkrimi;
    }

    public double getCmimiShumice() {
        return cmimiShumice;
    }

    public void setCmimiShumice(double cmimiShumice) {
        this.cmimiShumice = cmimiShumice;
    }

    public double getCmimiPakice() {
        return cmimiPakice;
    }

    public void setCmimiPakice(double cmimiPakice) {
        this.cmimiPakice = cmimiPakice;
    }

    public int getIgatshem() {
        return igatshem;
    }

    public void setIgatshem(int igatshem) {
        this.igatshem = igatshem;
    }

    public double getProdhimPerDoze() {
        return prodhimPerDoze;
    }

    public void setProdhimPerDoze(double prodhimPerDoze) {
        this.prodhimPerDoze = prodhimPerDoze;
    }

    public String getNjesia() {
        return njesia;
    }

    public void setNjesia(String njesia) {
        this.njesia = njesia;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getKategoriaID() {
        return kategoriaID;
    }

    public void setKategoriaID(int kategoriaID) {
        this.kategoriaID = kategoriaID;
    }
}
